<div class="container">
  <ol class="breadcrumb">
    <li><%= link_to 'Home', root_path %></li>
    <li class="active">VMS connectors</li>
  </ol>
</div>

<div class="container">
  <h1>
    All uploaded VMS connectors
    <a href="<%= new_vms_connector_path %>" class="btn btn-success"> <span class="glyphicon glyphicon-upload"></span>
      Upload a new VMS connector</a>
  </h1>


  <% if @vms_connectors.empty? %>
      <p>

      <div class="alert alert-warning">
        Currently no VMS connectors are uploaded to the system.
      </div>
      </p>
  <% else %>
      <div class="media">
        <table class="table table-hover">
          <thead>
          <tr>
            <th>#</th>
            <th>Name</th>
            <th>Description</th>
            <th></th>
            <th colspan="3"></th>
          </tr>
          </thead>

          <tbody>
          <% i = 1 %>
          <% @vms_connectors.each do |vms_conn| %>
              <tr>
                <td><%= i %></td>
                <td><%= vms_conn.name %></td>
                <td><%= vms_conn.description %></td>
                <td>
                  <% if (vms_conn.verified?) %>
                    <span class="label label-success">
                    <span class="glyphicon glyphicon-ok-sign" aria-hidden="true"></span>
                    Verified
                  </span>
                  <% else %>
                    <span class="label label-danger">
                    <span class="glyphicon glyphicon-remove-sign" aria-hidden="true"></span>
                    Invalid
                  </span>
                  <% end %>
                </td>
                <td><%= link_to 'Show', vms_conn, :class => "btn btn-xs btn-default" %></td>
                <td><%= link_to 'Edit', edit_vms_connector_path(vms_conn), :class => "btn btn-xs btn-warning" %></td>
                <td><%= link_to 'Destroy', vms_conn, method: :delete, :class => "btn btn-xs btn-danger", data: {confirm: 'Are you sure?'} %></td>
              </tr>
              <% i = i + 1 %>
          <% end %>
          </tbody>
        </table>
      </div>
  <% end %>
</div>